(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/index/index" ], {
    "0a8a": function(e, t, i) {},
    "4b79": function(e, t, i) {
        var n = i("0a8a");
        i.n(n).a;
    },
    "4f61": function(e, t, i) {
        i.r(t);
        var n, a = i("7a7a"), s = i.n(a);
        for (n in a) "default" !== n && function(e) {
            i.d(t, e, function() {
                return a[e];
            });
        }(n);
        t.default = s.a;
    },
    "7a7a": function(e, i, n) {
        (function(s) {
            function t(t, e) {
                var i, n = Object.keys(t);
                return Object.getOwnPropertySymbols && (i = Object.getOwnPropertySymbols(t), e && (i = i.filter(function(e) {
                    return Object.getOwnPropertyDescriptor(t, e).enumerable;
                })), n.push.apply(n, i)), n;
            }
            Object.defineProperty(i, "__esModule", {
                value: !0
            });
            var e = {
                components: {
                    indexSearch: function() {
                        n.e("pages/index/components/index-search").then(function() {
                            return resolve(n("e8fc"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    shMenu: function() {
                        n.e("pages/index/components/sh-menu").then(function() {
                            return resolve(n("9510"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    indexBanner: function() {
                        Promise.all([ n.e("common/vendor"), n.e("pages/index/components/index-banner") ]).then(function() {
                            return resolve(n("ff99"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    indexNotice: function() {
                        n.e("pages/index/components/index-notice").then(function() {
                            return resolve(n("ab40"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    shAdv: function() {
                        n.e("pages/index/components/sh-adv").then(function() {
                            return resolve(n("d5ac"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    shImg: function() {
                        n.e("pages/index/components/sh-img").then(function() {
                            return resolve(n("0abd"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    shHotGoods: function() {
                        n.e("pages/index/components/sh-hot-goods").then(function() {
                            return resolve(n("cab2"));
                        }.bind(null, n)).catch(n.oe);
                    },
                    indexFloatBar: function() {
                        n.e("pages/index/components/index-float-bar").then(function() {
                            return resolve(n("efa62"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                data: function() {
                    return {
                        items: {},
                        houseList: [],
                        apartment_list: [],
                        isLoading: 1,
                        isLoading2: 0,
                        page: 1,
                        selectshow: 0,
                        itemIndex: -1,
                        tagList: [],
                        directionList: [],
                        decorateList: [],
                        houseTypeList: [],
                        priceList: [],
                        areaList: [],
                        dtList: [],
                        buildareaList: [],
                        letWayList: [],
                        shiList: [],
                        query: {
                            headArea: "",
                            headPrice: "租金",
                            headShi: "户型",
                            headMore: "更多",
                            areaTypeIndex: 1,
                            price_index: 0,
                            area_id: 0,
                            area_index: -1,
                            buildarea_id: 0,
                            buildarea_index: -1,
                            let_way: 0,
                            shi_ids: [],
                            tag_ids: [],
                            decorate_ids: [],
                            direction_ids: [],
                            house_type_ids: []
                        },
                        query2: {
                            headArea: "",
                            headPrice: "租金",
                            headShi: "户型",
                            headMore: "更多",
                            areaTypeIndex: 1,
                            price_index: 0,
                            area_id: 0,
                            area_index: -1,
                            buildarea_id: 0,
                            buildarea_index: -1,
                            let_way: 0,
                            shi_ids: [],
                            tag_ids: [],
                            decorate_ids: [],
                            direction_ids: [],
                            house_type_ids: []
                        }
                    };
                },
                onLoad: function() {
                    s.hideTabBar({});
                    var e, t = this.$Route.query;
                    console.info(t), t.scene ? (e = decodeURIComponent(t.scene)) && s.setStorageSync("share_uid", e) : t.share_uid && s.setStorageSync("share_uid", t.share_uid), 
                    wx.showShareMenu({
                        withShareTicket: !0,
                        menus: [ "shareAppMessage", "shareTimeline" ]
                    });
                },
                onShow: function() {
                    this.init();
                },
                computed: function(n) {
                    for (var e = 1; e < arguments.length; e++) {
                        var a = null != arguments[e] ? arguments[e] : {};
                        e % 2 ? t(Object(a), !0).forEach(function(e) {
                            var t, i;
                            t = n, e = a[i = e], i in t ? Object.defineProperty(t, i, {
                                value: e,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : t[i] = e;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(a)) : t(Object(a)).forEach(function(e) {
                            Object.defineProperty(n, e, Object.getOwnPropertyDescriptor(a, e));
                        });
                    }
                    return n;
                }({}, (i.default = void 0, n("26cb").mapState)({
                    cityArea: function(e) {
                        return e.init.cityArea;
                    },
                    basicSet: function(e) {
                        return e.init.basicSet;
                    },
                    loginUser: function(e) {
                        return e.user.loginUser;
                    },
                    hbData: function(e) {
                        return e.init.hbData;
                    }
                })),
                methods: {
                    init: function() {
                        var e = s.getStorageSync("time"), t = new Date().getTime();
                        (1 == this.isLoading || !e || e < t) && this.getIndex(), s.getStorageSync("location") || this.getLocation();
                    },
                    onReachBottom: function() {
                        this.isLoading2 = 1, this.page = this.page + 1, this.getHouses();
                    },
                    selectCity: function() {
                        this.getIndex();
                    },
                    getLocation: function() {
                        var n = this, a = {
                            lng: 112.88161184486391,
                            lat: 28.223549677400733,
                            city: "长沙市",
                            area: "岳麓区"
                        };
                        s.getLocation({
                            type: "gcj02 ",
                            altitude: true,
                            success: function(e) {
                                n.$api("index.getLocation", {
                                    lat: e.latitude,
                                    lng: e.longitude
                                }).then(function(i) {
                                    a = i.data.location, n.$store.commit("location", a), 1 == i.data.city_open && a.cityId != n.cityArea.cityId && s.showModal({
                                        title: "提示",
                                        content: "是否切换到当前定位城市：" + a.city,
                                        success: function(e) {
                                            var t;
                                            i.confirm ? (console.log("用户点击确定"), t = {
                                                cityId: a.cityId,
                                                cityName: a.city
                                            }, n.$store.commit("cityArea", t), n.getIndex()) : i.cancel && console.log("用户点击取消");
                                        }
                                    });
                                });
                            },
                            fail: function(e) {
                                n.$store.commit("location", a);
                            }
                        });
                    },
                    getIndex: function() {
                        var i = this, n = this;
                        this.isLoading && s.showLoading({
                            title: "加载中"
                        }), this.$api("index.index", {
                            cityId: n.cityArea.cityId
                        }).then(function(e) {
                            var t = e.data.hbData;
                            n.items = e.data.items, n.apartment_list = e.data.apartment_list, n.$store.commit("hbData", t), 
                            n.$store.commit("basicSet", e.data.basicSet), i.isLoading && s.hideLoading(), setTimeout(function() {
                                n.isLoading = 0;
                            }, 300), n.getHouses(), n.indexSet(), e.data.cityArea && n.$store.commit("cityArea", e.data.cityArea);
                            t = t.head.params.title;
                            s.setNavigationBarTitle({
                                title: t
                            });
                            t = new Date().getTime() + 12e4;
                            s.setStorageSync("time", t);
                        });
                    },
                    navToApartmentList: function() {
                        this.$Router.push({
                            path: "/pages/index/apartment/list",
                            query: {}
                        });
                    },
                    navToApartmentDetail: function(e) {
                        this.$Router.push({
                            path: "/pages/index/apartment/detail",
                            query: {
                                id: e
                            }
                        });
                    },
                    getHouses: function() {
                        var t = this, e = this.query, i = {
                            city_id: t.cityArea.cityId,
                            area_id: e.area_id,
                            buildarea_id: e.buildarea_id,
                            let_way: e.let_way,
                            shiIds: e.shi_ids.join(","),
                            directionIds: e.direction_ids.join(","),
                            decorateIds: e.decorate_ids.join(","),
                            houseTypeIds: e.house_type_ids.join(","),
                            tag_ids: e.tag_ids.join(","),
                            page: t.page
                        };
                        0 < this.priceList.length && 0 < e.price_index && (e = this.priceList[e.price_index], 
                        i.start_price = e.start, i.end_price = e.end), this.$api("index.getHouses", i).then(function(e) {
                            e = e.data.list;
                            t.isLoading2 = 0, 1 == t.page ? t.houseList = e : 0 < e.length ? t.houseList = t.houseList.concat(e) : t.page = t.page - 1;
                        });
                    },
                    indexSet: function() {
                        var t = this;
                        this.$api("index.indexSet", {
                            cityId: t.cityArea.cityId
                        }).then(function(e) {
                            t.tagList = e.data.tagList, t.directionList = e.data.directionList, t.decorateList = e.data.decorateList, 
                            t.houseTypeList = e.data.houseTypeList, t.priceList = e.data.priceList, t.letWayList = e.data.letWayList, 
                            t.areaList = e.data.areaList, t.dtList = e.data.dtList,t.shiList = e.data.shiList, t.$store.commit("cityList", e.data.cityList);
                        });
                    },
                    selectConfirm: function() {
                        this.query2 = JSON.parse(JSON.stringify(this.query)), this.selectshow = !1, this.page = 1, 
                        this.getHouses();
                    },
                    selectTab: function(e) {
                        this.selectshow = !0, this.itemIndex = e;
                    },
                    selectClose: function() {
                        this.query = JSON.parse(JSON.stringify(this.query2)), this.selectshow = !1;
                    },
                    selectClear: function() {
                        this.query = {
                            areaTypeIndex: 1,
                            price_index: 0,
                            area_id: 0,
                            area_index: -1,
                            buildarea_id: 0,
                            buildarea_index: -1,
                            let_way: 0,
                            shi_ids: [],
                            tag_ids: [],
                            decorate_ids: [],
                            direction_ids: [],
                            house_type_ids: [],
                            headArea: "",
                            headPrice: "",
                            headShi: "户型",
                            headMore: "更多"
                        }, this.selectshow = !1, this.page = 1, this.getHouses();
                    },
                    selectDq: function() {
                        this.query.areaTypeIndex = 1;
                    },
                    selectDt: function() {
                        this.query.areaTypeIndex = 2;
                    },
                    selectArea: function(e) {
                        var t = this.areaList[e], i = this.query;
                        t.id == i.area_id ? (i.area_id = 0, i.buildareaList = [], i.buildarea_id = 0, i.headArea = "", 
                        i.area_index = -1) : (this.buildareaList = t.buildareaList, i.area_id = t.id, i.buildarea_id = 0, 
                        i.headArea = t.name, i.area_index = e);
                    },
                    selectdt: function(e) {
                        var t = this.dtList[e], i = this.query;
                        t.id == i.area_id ? (i.area_id = 0, i.buildareaList = [], i.buildarea_id = 0, i.headArea = "", 
                        i.area_index = -1) : (this.buildareaList = t.buildareaList, i.area_id = t.id, i.buildarea_id = 0, 
                        i.headArea = t.name, i.area_index = e);
                    },
                    selectBuildarea: function(e) {
                        var t = this.query, e = this.buildareaList[e];
                        e.id == t.buildarea_id ? (t.buildarea_id = 0, t.headArea = this.areaList[t.area_index].name) : (t.buildarea_id = e.id, 
                        t.headArea = e.name);
                    },
                    choosePrice: function(e) {
                        this.query.price_index = e;
                    },
                    chooseLetWay: function(e) {
                        var t = this.query;
                        e == t.let_way ? t.let_way = 0 : t.let_way = e;
                    },
                    chooseShi: function(e) {
                        var t = this.query, i = this.shiList[e], e = t.shi_ids.indexOf(i.id);
                        -1 < e ? t.shi_ids.splice(e, 1) : t.shi_ids.push(i.id);
                    },
                    select_tag: function(e) {
                        var t = this.query, i = this.tagList[e], e = t.tag_ids.indexOf(i.id);
                        -1 < e ? t.tag_ids.splice(e, 1) : t.tag_ids.push(i.id), this.query2.tag_ids = JSON.parse(JSON.stringify(t.tag_ids)), 
                        this.page = 1, this.getHouses();
                    },
                    chooseTag: function(e) {
                        var t = this.query, i = this.tagList[e], e = t.tag_ids.indexOf(i.id);
                        -1 < e ? t.tag_ids.splice(e, 1) : t.tag_ids.push(i.id);
                    },
                    chooseDirection: function(e) {
                        var t = this.query, i = this.directionList[e], e = t.direction_ids.indexOf(i.name);
                        -1 < e ? t.direction_ids.splice(e, 1) : t.direction_ids.push(i.name);
                    },
                    chooseDecorate: function(e) {
                        var t = this.query, i = this.decorateList[e], e = t.decorate_ids.indexOf(i.name);
                        -1 < e ? t.decorate_ids.splice(e, 1) : t.decorate_ids.push(i.name);
                    },
                    chooseHouseType: function(e) {
                        var t = this.query, i = this.houseTypeList[e], e = t.house_type_ids.indexOf(i.name);
                        -1 < e ? t.house_type_ids.splice(e, 1) : t.house_type_ids.push(i.name);
                    },
                    onShareTimeline: function(e) {
                        return {
                            title: this.basicSet.home_title
                        };
                    },
                    onShareAppMessage: function(e) {
                        var t = this.basicSet.home_title;
                        return 0 == this.loginUser.id && s.showToast({
                            title: "登陆之后转发，才会有转发记录的",
                            icon: "none"
                        }), {
                            title: t,
                            path: "pages/index/index?share_uid=" + this.loginUser.id
                        };
                    }
                }
            };
            i.default = e;
        }).call(this, n("543d").default);
    },
    "883e": function(e, t, i) {
        i.d(t, "b", function() {
            return a;
        }), i.d(t, "c", function() {
            return s;
        }), i.d(t, "a", function() {
            return n;
        });
        var n = {
            wkLethouses: function() {
                return i.e("components/wk-lethouses/index").then(i.bind(null, "295a"));
            },
            wkTabar: function() {
                return i.e("components/wk-tabar/index").then(i.bind(null, "44ca"));
            },
            wkLoginModal: function() {
                return i.e("components/wk-login-modal/index").then(i.bind(null, "978a"));
            },
            wkSkeletons: function() {
                return i.e("components/wk-skeletons/index").then(i.bind(null, "5375"));
            }
        }, a = function() {
            var i = this, e = (i.$createElement, i._self._c, !i.selectshow && 0 < i.tagList.length ? i.__map(i.tagList, function(e, t) {
                return {
                    $orig: i.__get_orig(e),
                    g0: i.query.tag_ids.indexOf(e.id)
                };
            }) : null), t = i.selectshow && 2 == i.itemIndex ? i.__map(i.shiList, function(e, t) {
                return {
                    $orig: i.__get_orig(e),
                    g1: i.query.shi_ids.indexOf(e.id)
                };
            }) : null, n = i.selectshow && 3 == i.itemIndex ? i.__map(i.tagList, function(e, t) {
                return {
                    $orig: i.__get_orig(e),
                    g2: i.query.tag_ids.indexOf(e.id)
                };
            }) : null, a = i.selectshow && 3 == i.itemIndex ? i.__map(i.directionList, function(e, t) {
                return {
                    $orig: i.__get_orig(e),
                    g3: i.query.direction_ids.indexOf(e.name)
                };
            }) : null, s = i.selectshow && 3 == i.itemIndex ? i.__map(i.decorateList, function(e, t) {
                return {
                    $orig: i.__get_orig(e),
                    g4: i.query.decorate_ids.indexOf(e.name)
                };
            }) : null, o = i.selectshow && 3 == i.itemIndex ? i.__map(i.houseTypeList, function(e, t) {
                return {
                    $orig: i.__get_orig(e),
                    g5: i.query.house_type_ids.indexOf(e.name)
                };
            }) : null;
            i.$mp.data = Object.assign({}, {
                $root: {
                    l0: e,
                    l1: t,
                    l2: n,
                    l3: a,
                    l4: s,
                    l5: o
                }
            });
        }, s = [];
    },
    "8bd5": function(e, t, i) {
        i.r(t);
        var n, a = i("883e"), s = i("4f61");
        for (n in s) "default" !== n && function(e) {
            i.d(t, e, function() {
                return s[e];
            });
        }(n);
        i("4b79");
        var o = i("f0c5"), a = Object(o.a)(s.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
        t.default = a.exports;
    },
    "9cd1": function(e, t, n) {
        (function(e) {
            n("767a"), i(n("66fd"));
            var t = i(n("8bd5"));
            function i(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, e(t.default);
        }).call(this, n("543d").createPage);
    }
}, [ [ "9cd1", "common/runtime", "common/vendor" ] ] ]);